﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="CarShopManagerWeb.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div align="center">
            <div>豪华车客户预定系统</div>
            车辆名称：<asp:TextBox ID="txtCarName" runat="server"></asp:TextBox>
            车辆类别：<asp:DropDownList ID="DDLCarType" runat="server">
                <asp:ListItem Value="0">请选择</asp:ListItem>
                <asp:ListItem Value="1">轿车</asp:ListItem>
                <asp:ListItem Value="2">跑车</asp:ListItem>
                <asp:ListItem Value="3">SUV</asp:ListItem>
            </asp:DropDownList>
            <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
            <asp:GridView ID="GDVCarOrderList" runat="server" AutoGenerateColumns="False"
                CellPadding="4" ForeColor="#333333" GridLines="None">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="Id" HeaderText="编号" />
                    <asp:BoundField DataField="Name" HeaderText="名称" />
                    <asp:BoundField DataField="GuidePrice" HeaderText="指导价" />
                    <asp:BoundField DataField="SellingPrice" HeaderText="售价" />
                    <asp:TemplateField HeaderText="类型">
                        <ItemTemplate>
                            <%#Eval("CarType").ToString() == "1" ? "轿车" : Eval("CarType").ToString() == "2"?"跑车":"SUV"%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <%#Convert.ToBoolean(Eval("CarState"))==true?"已售出":"在售"%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="SellingDate" HeaderText="销售日期" />
                    <asp:BoundField DataField="ClientName" HeaderText="客户姓名" />
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server"
                                OnCommand="LinkButton1_Command" Visible='<%#Convert.ToBoolean(Eval("CarState"))==true?false:true%>' CommandArgument='<%#Eval("Id") %>'>客户预定</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                <SortedAscendingCellStyle BackColor="#FDF5AC" />
                <SortedAscendingHeaderStyle BackColor="#4D0000" />
                <SortedDescendingCellStyle BackColor="#FCF6C0" />
                <SortedDescendingHeaderStyle BackColor="#820000" />
            </asp:GridView>
        </div>

    </form>
</body>
</html>
